Programming with QuickTime VR

| Previous | Chapter contents | Chapter top | Section top | Next |

Pixel Formats

QuickTime VR 2.1 supports imaging to and from buffers in any of several pixel formats, allowing for imaging directly to the screen buffer on most video cards used in computers that support Microsoft Windows. The cachePixelFormat parameter passed to the QTVRGetBackBufferMemInfo , QTVRGetBackBufferSettings , and QTVRSetBackBufferPrefs functions [link] specifies the pixel format.

On the Macintosh, QuickTime VR 2.1 can directly image into the standard 16- and 32-bit big-endian formats (16BE555 and 32ARGB). On Windows systems, QuickTime VR 2.1 supports the Macintosh formats along with 16LE555, 16LE565, 32BGRA, 32ABGR, 32RGBA, 24RGB and 24BGR. QuickTime VR does not support the 16BE565 format.

The pixel formats are defined as follows:

#define k16BE555PixelFormat     0x00000010               // 16 bit BE rgb 555
#define k16LE555PixelFormat     FOUR_CHAR_CODE('L555')   // 16 bit LE rgb 555 (PC)
#define k16BE565PixelFormat     FOUR_CHAR_CODE('B565')   // 16 bit BE rgb 565
#define k16LE565PixelFormat     FOUR_CHAR_CODE('L565')   // 16 bit LE rgb 565
#define k24BGRPixelFormat       FOUR_CHAR_CODE('24BG')   // 24bit bgr
#define k32ARGBPixelFormat      0x00000020               // 32 bit argb
#define k32BGRAPixelFormat      FOUR_CHAR_CODE('BGRA')   // 32 bit bgra (Matrox)
#define k32ABGRPixelFormat      FOUR_CHAR_CODE('ABGR')   // 32 bit abgr
#define k32RGBAPixelFormat      FOUR_CHAR_CODE('RGBA')   // 32 bit rgba

Developers should allow for the possibility that future versions of QuickTime VR may support additional formats.

You can use the pixel format constants defined above in the cachePixelFormat parameter passed to the QTVRGetBackBufferMemInfo , QTVRGetBackBufferSettings , and QTVRSetBackBufferPrefs functions, or you may use the following constants to specify only the depth:

enum{
    kQTVRUseMovieDepth                              = 0,
};

Constant descriptions

kQTVRUseMovieDepth
A pixel has the same depth as the movie window.

When performing direct-to-screen drawing of panoramas, the cache format must match the screen format. Otherwise, the panoramic image will be generated offscreen and then copied to the screen. If the application has not set a cache format preference, QuickTime VR 2.1 tries to match the backbuffer format to the screen format.

If the application has installed a prescreen buffer imaging complete procedure, the GWorld passed to it will be in the same format as the panoramic backbuffer.


© 1997 Apple Computer, Inc.

| Previous | Chapter contents | Chapter top | Section top | Next |